﻿using System;
using UnityEngine;
using Utility;

// Token: 0x020002F7 RID: 759
public class Scene : MonoBehaviour
{
	// Token: 0x170001CD RID: 461
	// (get) Token: 0x06001374 RID: 4980 RVA: 0x0008B7E4 File Offset: 0x000899E4
	public GameControl GC
	{
		get
		{
			return this.gameCtrl;
		}
	}

	// Token: 0x170001CE RID: 462
	// (get) Token: 0x06001375 RID: 4981 RVA: 0x0008B7EC File Offset: 0x000899EC
	public bool InFading
	{
		get
		{
			return this.inFade != null;
		}
	}

	// Token: 0x06001376 RID: 4982 RVA: 0x0008B7FC File Offset: 0x000899FC
	protected void InScene(bool fadeIn = true)
	{
		this.gameCtrl = UnityEngine.Object.FindObjectOfType<GameControl>();
		if (this.gameCtrl == null)
		{
			this.gameCtrl = ResourceUtility.CreateInstance<GameControl>("CommonPrefabs/GameControl");
		}
		this.gameCtrl.sceneCtrl.SetScene(this);
		this.sceneInMsg = this.GC.sceneCtrl.RequestChangeMessage();
		if (fadeIn)
		{
			this.FadeIn();
		}
	}

	// Token: 0x06001377 RID: 4983 RVA: 0x0008B868 File Offset: 0x00089A68
	public virtual void OutScene(string next)
	{
	}

	// Token: 0x06001378 RID: 4984 RVA: 0x0008B86C File Offset: 0x00089A6C
	protected void FadeIn()
	{
		Color fadeColor = this.GC.sceneCtrl.FadeColor;
		float fadeTime = this.GC.sceneCtrl.FadeTime;
		this.inFade = ScreenFade.StartFade(ScreenFade.TYPE.IN, fadeColor, fadeTime, 0f, null, true);
	}

	// Token: 0x04001884 RID: 6276
	protected string sceneInMsg = string.Empty;

	// Token: 0x04001885 RID: 6277
	protected GameControl gameCtrl;

	// Token: 0x04001886 RID: 6278
	protected ScreenFade inFade;
}
